<%--
  Created by IntelliJ IDEA.
  User: shisan
  Date: 2020/12/3
  Time: 10:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>

<%@ page import="Dao.DbDao" %>
<%@ page import="entity.Game" %>
<%@ page import="java.util.ArrayList" %>
<html>
<%!
    DbDao dbDao = new DbDao();
    ArrayList<Game> games = dbDao.getGames();
%>
<%
    int id=Integer.parseInt(request.getParameter("gameid"));
    Game game=new Game();
    for (int i=0;i<games.size();i++){
        if(games.get(i).getId()==id)game=games.get(i);
    }
%>
<head>

    <meta charset="utf-8">
    <link rel="icon" href="../imgres/1.ico" type="image/x-icon">
    <title><%=game.getName()%>详情</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

</head>

<body style="background-color: #1c1c1c;">

<div style="background-color: #2a2a2a; height: 50px;width: 100%">

    <div>
        <a href="../jsp/index.jsp" style="font-size: .8em; color:darkgrey ;line-height: 52px;left: 20px;text-decoration:none;position: relative">< 返回商城</a>
    </div>


</div>ds2

<div style=" height:800px;width: 70%;left: 17.2%; position:relative; ">
    <img src="../imgres/<%=game.getCoverurl()%>" style="width: 228px; height: 304px;margin: 70px;">
    <div style="display: inline-block;top: 70px;left: 50%;position: absolute;height: 390px;width: 450px;">
        <span style="left: 50px;position: relative;font-size: 24px;color: #e7e7e7;top: 10px"><%=game.getName()%></span>

        <hr style="display: block;height:1px;background-color: white; width: 300px;right: 25px;top:20px;position: relative">
        <span style="top: 245px;left: 60%;position: absolute;font-size: 15px;color: #e7e7e7;">发行日期</span>
        <span style="top: 245px;left: 50px;position: absolute;font-size: 15px;color: #e7e7e7;">标签</span>
        <span style="top: 270px;left: 60%;position: absolute;font-size: 15px;color: #e7e7e7;"><%=game.getDate() %></span>
        <span style="top: 270px;left: 50px;position: absolute;font-size: 15px;color: #e7e7e7;"><%=game.getLabel()%></span>
    </div>
    <div style=" margin-right:120px;margin-left: 100px;margin-top: 20px;position: relative;height: 100%;">
        <p style="color: #e7e7e7;font-size: 14px;text-indent: 2em;line-height:1.5em;"><%=game.getIntroduction()%></p>
    </div>

</div>
</body>
</html>